<div class="col-sm-12">
  <!-- BOX -->
  <div class="box">
    <div class="box-body">
      <div class="col-sm-12 nopadding-left">
        <div class="bottom12">
          <ul class="nav nav-tabs">
            <li id='rechargeTab' class=""><a href="#box_tab1" data-toggle="tab" {{action 'chooseTab' "rechargeTab"}}>
               <span class="hidden-inline-mobile">充值审核</span></a>
            </li>
            <li id='billTab' class=""><a href="#box_tab2" data-toggle="tab" {{action 'chooseTab' "billTab"}} >
             <span class="hidden-inline-mobile">账单审核</span></a>
            </li>
            <li id='settlementBillTab' class=""><a href="#box_tab3" data-toggle="tab" {{action 'chooseTab' "settlementBillTab"}} >
             <span class="hidden-inline-mobile">结算审核</span></a>
            </li>
          </ul>
            <div class="clear"></div>
        </div>
      </div>
      <div class="row ">
        <div class="col-sm-9 ">
          <div class="col-sm-5 nopadding-left">
            <div class="pull-left">
              <div class="input-group bottom8">
                {{input class="form-control" type="text" placeholder="搜索客户姓名" value=queryCondition enter="search"}}
                <span class="input-group-btn">
                  <button class="btn btn-primary btn-reduce" type="button" style="touch-action: manipulation; -ms-touch-action: manipulation;" {{action "search" on="click"}}>
                    <i class="fa fa-search"></i>
                  </button>
                </span>
              </div>
            </div>
            <!--搜索-->
          </div>
          <div class="col-sm-7 nopadding-right nopadding-left {{if rechargeTab "show" "hide"}}">
            {{callbusi/time-search class="inline-block" text='按充值日期搜索' dateShow=dateShow chooseDate=chooseDate search="search"
            submmit="submmit" emptied='emptied' changeBeginDateAction='changeBeginDateAction' changeEndDateAction='changeEndDateAction'}}
          </div>
        </div>
      </div>
      {{#if billTab}}
        <div id="datatable1_wrapper" class="dataTables_wrapper form-inline" role="grid">
          <table id="datatable1" cellpadding="0" cellspacing="0" border="0" class="datatable table table-bordered table-hover dataTable" aria-describillby="datatable1_info">
            <thead>
              <tr role="row">
                <th rowspan="1" colspan="1" width="">客户姓名</th>
                <th rowspan="1" colspan="1" width="">结算类别</th>
                <th rowspan="1" colspan="1" width="">账单时间</th>
                <th rowspan="1" colspan="1" width="">账单金额(元)</th>
                <th rowspan="1" colspan="1" width="" class="width300">备注</th>
                <th rowspan="1" colspan="1" width="">账单状态</th>
                <th rowspan="1" colspan="1" width="">操作</th>
              </tr>
            </thead>
            {{#if billList}}
            <tbody role="alert" aria-live="polite" aria-relevant="all" class="">
              {{#each billList as |bill|}}
              <tr {{action "toDetailPage" bill 'billType' on="click"}}>
                <td class="ellipsis" >{{bill.customer.name}}</td>
                <td class="ellipsis" >
                  {{bill.billType.typename}}
                  {{#if bill.operateFlag}}
                    ({{bill.changeService}})
                  {{/if}}
                </td>
                <td class="ellipsis" >{{bill.showTime}}</td>
                <td class="ellipsis" >{{bill.total}}</td>
                <td class="ellipsis" class="width300"><div class="width300 extend">{{bill.showRemark}}</div></td>
                <td class="ellipsis" >{{bill.billStatus.typename}}</td>
                <td class="ellipsis" ><a {{action 'auditBill' bill on="click" bubbles=false}}>审核</a></td>
              </tr>
              {{/each}}
            </tbody>
            {{else}}
            {{/if}}
          </table>
          {{#if billList }}
              {{page-numbers content=billList showFL=true numPagesToShow=5}}
          {{else}}
                  <h1 class="col-sm-12 center unTask"></h1>
          {{/if}}
        </div>
      {{/if}}
      {{#if rechargeTab}}
        <div id="datatable1_wrapper" class="dataTables_wrapper form-inline" role="grid">
              <table id="datatable1" cellpadding="0" cellspacing="0" border="0"  class="datatable table table-bordered table-hover dataTable mt15" aria-describedby="datatable1_info">
                <thead>
                  <tr role="row">
                    <th rowspan="1" colspan="1" width="">客户姓名</th>
                    <th rowspan="1" colspan="1" width="">账户类型</th>
                    <th rowspan="1" colspan="1" width="">充值金额(元)</th>
                    <th rowspan="1" colspan="1" width="">充值日期</th>
                    <th rowspan="1" colspan="1" width="">充值方式</th>
                    <th rowspan="1" colspan="1" width="" class="width300">备注</th>
                    <th rowspan="1" colspan="1" width="">操作</th>
                  </tr>
                </thead>
                {{#if rechargeList}}
              <tbody role="alert" aria-live="polite" aria-relevant="all" class="">
                  {{#each rechargeList as |recharge|}}
                  <tr class="gradeA odd" {{action "toDetailPage" recharge 'rechargeType' on="click"}}>
                    <td class=" ellipsis sorting_1">{{recharge.rechargeAccount.customer.name}}</td>
                    <td class=" ellipsis ">{{recharge.rechargeAccount.type.typename}}</td>
                    <td class=" ellipsis ">{{recharge.money}}</td>
                    <td class=" ellipsis ">{{recharge.createDateString}}</td>
                    <td class=" ellipsis ">{{{recharge.channel.typename}}}</td>
                    <td class="ellipsis" class="width300"><div class="width300 extend">{{recharge.remark}}</div></td>
                    <td class="ellipsis" ><a {{action 'auditBill' recharge on="click" bubbles=false}}>审核</a></td>
                  </tr>
                  {{/each}}
               </tbody>
               {{else}}
               {{/if}}
                </table>
          {{#if rechargeList }}
              {{page-numbers content=rechargeList showFL=true numPagesToShow=3}}
          {{else}}
              <h1 class="col-sm-12 center unTask"></h1>
          {{/if}}
        </div>
      {{/if}}
      {{#if settlementBillTab}}
        <div id="datatable1_wrapper" class="dataTables_wrapper form-inline" role="grid">
              <table id="datatable1" cellpadding="0" cellspacing="0" border="0"  class="datatable table table-bordered table-hover dataTable mt15" aria-describedby="datatable1_info">
                <thead>
                  <tr role="row">
                    <th rowspan="1" colspan="1" width="">老人姓名</th>
                    <th rowspan="1" colspan="1" width="">提交日期</th>
                    <th rowspan="1" colspan="1" width="">账户余额(元)</th>
                    <th rowspan="1" colspan="1" width="">保证金余额(元)</th>
                    <th rowspan="1" colspan="1" width="">结算类型</th>
                    <th rowspan="1" colspan="1" width="">结算金额(元)</th>
                    <th rowspan="1" colspan="1" width="">结算状态</th>
                    <th rowspan="1" colspan="1" width="" class="width300">备注</th>
                    <th rowspan="1" colspan="1" width="">操作</th>
                  </tr>
                </thead>
                {{#if settlementBillList}}
              <tbody role="alert" aria-live="polite" aria-relevant="all" class="">
                  {{#each settlementBillList as |settlementBill|}}
                  <tr class="gradeA odd" {{action "toDetailPage" settlementBill 'settlementBillType' on="click"}}>
                    <td class=" ellipsis sorting_1">{{settlementBill.customer.name}}</td>
                    <td class=" ellipsis ">{{settlementBill.billTimeStr}}</td>
                    <td class=" ellipsis ">{{settlementBill.accountAmount}}</td>
                    <td class=" ellipsis ">{{settlementBill.depositAmount}}</td>
                    <td class=" ellipsis ">{{{settlementBill.billType.typename}}}</td>
                    <td class=" ellipsis ">{{{settlementBill.totalAmount}}}</td>
                    <td class=" ellipsis ">{{{settlementBill.billStatus.typename}}}</td>
                    <td class="ellipsis" class="width300"><div class="width300 extend">{{settlementBill.remark}}</div></td>
                    <td class="ellipsis" ><a {{action 'auditBill' settlementBill on="click" bubbles=false}}>审核</a></td>
                  </tr>
                  {{/each}}
               </tbody>
               {{else}}
               {{/if}}
                </table>
          {{#if settlementBillList }}
              {{page-numbers content=settlementBillList showFL=true numPagesToShow=3}}
          {{else}}
              <h1 class="col-sm-12 center unTask"></h1>
          {{/if}}
        </div>
      {{/if}}
    </div>
  </div>

  <!-- /BOX -->
</div>

{{#if showAudit}}
	{{#bs-modal body=false footer=false header=false closeAction='close'}}
		{{#bs-modal-header}}
			<h3 class="modal-title">审核提示</h3>
		{{/bs-modal-header}}
		{{#bs-modal-body}}
			<h4 class="modal-title center">是否确定通过审核</h4>
		{{/bs-modal-body}}
    {{#bs-modal-footer class="user-add-btn"}}
      {{#ui/mix-button class="user-btn edit-btn" iconClass="fa fa-check"  text='审核通过' clickAction="passed" passed="passed" }}
      {{/ui/mix-button}}
      {{#ui/mix-button class="user-btn times-btn" iconClass="fa fa-undo"  text='取消'  clickAction="close" close="close"}}
      {{/ui/mix-button}}
    {{/bs-modal-footer}}
	{{/bs-modal}}
{{/if}}
